<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>图书管理页面</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
    <ul class="breadcrumb">
        <li>
            <a href="log_in.html" th:href="@{/bookmanager/login}">登录页面</a>
        </li>
        <li class="active">
            图书管理主页
        </li>
        <li>
            <a href="/bookmanager/add" th:href="@{/bookmanager/add}">图书登记</a>
        </li>
        <li>
            <a href="/bookmanager/logout" th:href="@{/bookmanager/logout}">注销</a>
        </li>
    </ul>

    <div class="row clearfix">
    <div class="col-md-12 column">
        <h2 class="text-center" style="color: dodgerblue">
            图书列表展示
        </h2>
    </div>
        <div class="row clearfix">
            <div class="col-md-12 column">
                <table class="table">
                    <thead>
                    <tr>
                        <th>图书序号</th>
                        <th>书名</th>
                        <th>出版社</th>
                        <th>作者</th>
                        <th>选项</th>
                    </tr>
                    </thead>
                    <tbody >
                    <tr th:each="book:${books}" >
                        <td th:text="${bookStat.count}">1</td>
                        <td th:text="${book.book_name}">图书名</td>
                        <td th:text="${book.press}">出版社</td>
                        <td th:text="${book.auther}">作者</td>
                        <td>
                            <a type="button" class="btn btn-primary" href="/bookmanager/bookinfo?book_id=1" th:href="@{/bookmanager/bookinfo(book_id=${bookStat.index})}">查看详细信息</a>
                            <a type="button" class="btn btn-primary" href="/bookmanager/change?book_id=1" th:href="@{/bookmanager/change(book_id=${bookStat.index})}">修改图书信息</a>
                            <a type="button" class="btn btn-primary"  href="./delete?book_id=1" th:href="@{/bookmanager/delete(book_id=${bookStat.index})}">删除图书信息</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>
</body>
</html>